Skip to content

Preserve generic type info in awaitEntity()#36834

Closed
wushiyuanmaimob wants to merge 1 commit into
spring-projects:mainfrom
wushiyuanmaimob:fix/await-entity-preserve-generics-36770
Closed

Preserve generic type info in awaitEntity()#36834
wushiyuanmaimob wants to merge 1 commit into
spring-projects:mainfrom
wushiyuanmaimob:fix/await-entity-preserve-generics-36770

Conversation

@wushiyuanmaimob
Copy link
Copy Markdown
Contributor

awaitEntity() used T::class.java which erases generic type information (e.g. List becomes just List). Use the reified toEntity() extension instead, which preserves full generic type via ParameterizedTypeReference.

Closes gh-36770

awaitEntity() used T::class.java which erases generic type
information (e.g. List<Foo> becomes just List). Use the
reified toEntity<T>() extension instead, which preserves
full generic type via ParameterizedTypeReference.

Closes spring-projectsgh-36770
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 25, 2026
@sdeleuze sdeleuze self-assigned this May 25, 2026
@sdeleuze sdeleuze added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug theme: kotlin An issue related to Kotlin support and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 25, 2026
@sdeleuze sdeleuze added this to the 7.0.8 milestone May 25, 2026
@sdeleuze sdeleuze closed this in 85a8868 Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) theme: kotlin An issue related to Kotlin support type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebClient.ResponseSpec.awaitEntity() should preserve generic type information for parameterized types

3 participants